<template>
    <table table table-border border="1">
        <thead>
            <tr style="color: blue">
                <td>序号</td>
                <td>姓名</td>
                <td>手机号</td>
                <td>账号</td>
                <td>密码</td>
                <td>所属角色</td>
                <td>创建人</td>
            </tr>
        </thead>
        <tbody>
            <tr v-for="item in info">
                <td>{{ item.id }}</td>
                <td>{{ item.name }}</td>
                <td>{{ item.phone.substring(0, 3) + '****' + item.phone.substring(7) }}</td>
                <td>{{ item.yhm }}</td>
                <td>{{ item.pass }}</td>
                <td>{{ item.juese }}</td>
                <td>{{ item.createR }}</td>
            </tr>
        </tbody>
    </table>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue'
import axios from 'axios'

const info = ref([
    {
        id: 0,
        yhm: '',
        pass: '',
        name: '',
        phone: '',
        juese: '',
        createR: ''
    }
])
onMounted(() => {
    show()
})
const show = () => {
    axios.get('https://localhost:7190/api/User/Usershow').then(res => {
        info.value = res.data
    })
}
</script>
